<template>
  <div>
    <div class="litecar">
      <p>{{completeds.title}}</p>
    </div>
    <div class="intermediate" v-html="completeds.text">
    </div>
    <div class="downinput">
      <p class="answer">我的答案</p>
        <p style="text-indent:2em;">{{myanswer.title}}</p>
        <div style="display:flex;flex-wrap:wrap;">

        <div v-for="(item,idx) of myanswer.images" :key="idx" class="phoned">
          <img :src="item" alt="" style="width: 150rpx;height: 150rpx;">
        </div>
        </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      formItem: {
        info: "",
        imageurl: this.fileList
      },
      ID:'',
      completeds:'',
      myanswer:''
    };
  },
  onLoad(option) {
    this.ID = option.id;
  },
  mounted() {
    this.start()
  },
  methods: {
    start(){
        const ID = this.ID
          var that = this
        wx.request({
          url: this.$interfaces.findjob+"/"+ID,
         method: "get",
         success: function(res) {
           that.myanswer=res.data.data
            const IDs=res.data.schoolhomeworkid
            wx.request({
              url: that.$interfaces.Jobdetails+"/"+IDs,
        method: "get",
        success: function(res) {

          that.completeds=res.data
        }
      })
         }
        })
    }
  }
};
</script>
<style>
.litecar {
  padding: 20rpx;
  border-bottom: 1rpx solid black;
}
.intermediate {
  margin: 30rpx;
  background-color: #eff0f2;
  min-height: 250rpx;
  margin-bottom: 20rpx;
}
.downinput {
  padding: 20rpx;
  background-color: #eff0f2;
  margin-bottom: 20rpx;
  min-height:250rpx;

}
.answer {
  color: red;
}
  .qs_btns {
  top: 90%;
  width: 80%;
  background: #0099FF;
  color: #fff;
  border-radius: 5px;
}
.phoned{
 flex: 30%;
}
</style>
